/**
 *  @file Document.h
 */
#ifndef _XMLDOCUMENT_H_
#define _XMLDOCUMENT_H_

#include "../../common/BaseObject.h"
#include "../../io/Stream.h"

namespace cppflib
{

namespace collections { 
   namespace tree { class MultiChildTree; } 
}

namespace xml
{

namespace dom
{

class Node;

/**
 *  A class to implement the XML DOM-like interface
 */
class _DLLAPI Document : public BaseObject
{
private:
    collections::tree::MultiChildTree *pTree;
private:
    Document(void);
public:	
	virtual ~Document(void);
    Node *GetRootNode();
    Node *GetNodeByTagName(pcwstr_t tagName);

    PUBLIC Document * Parse(pcwstr_t xmlFilePath);
    PUBLIC Document * Parse(io::Stream &stream);
};

} // end of namespace dom

} // end of namespace xml

} // end of namespace cppflib


#endif
